#pragma once
#include "../stdafx.h"
//#include "../game/Manager.h"
#include "../scene/World.h"
//#include "../game/Figure.h"
#include "../math/math.h"

#define MAX 32

#define MOUSE	0
#define TEST	31

	class AABB;
	extern LPDIRECT3DDEVICE9 g_pd3dDevice; 
	class RenderEngine : public Component
	{
	public:
		RenderEngine(void);
		~RenderEngine(void);

		void addedToObject();
		HRESULT RenderList(DWORD t);
		void Init();
		
		HRESULT Render2DWorld();

		void BeginRender();
		void EndRender();

		//HRESULT RenderMouse(D3DXVECTOR2);

		void TestInit(AABB*);
		void RenderTest();

		DWORD GetTick();
		void SetTick(DWORD);

		
		D3DXMATRIX ObjWorldMatrices;
		ID3DXMesh* Teapot;
		LPDIRECT3DTEXTURE9      m_pTexture[MAX]; // Our texture
		LPDIRECT3DVERTEXBUFFER9 m_pVertices[MAX];
		LPDIRECT3DINDEXBUFFER9 m_pIndex[MAX];

		DWORD m_tick;
	};